treeviewcolumn: Clip header buttons
authorMatthias Clasen <mclasen@redhat.com>
Thu, 17 Jun 2021 22:54:36 +0000 (15:54 -0700)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 18 Jun 2021 00:14:14 +0000 (17:14 -0700)
We don't want to overdraw when dragging a narrow column
around, and we also need the clipping to avoid picking
the wrong column, when a later column button overlaps
an earlier one.

Fixes: #4045
gtk/gtktreeviewcolumn.c

index 4633cacc972f68980cb3d999f9d1f0385c2ef12a..50d2eac884b87056187cc5649951026490c893cd 100644 (file)
@@ -855,6 +855,7 @@ gtk_tree_view_column_create_button (GtkTreeViewColumn *tree_column)
   priv->button = gtk_button_new ();
   g_object_ref_sink (priv->button);
   gtk_widget_set_focus_on_click (priv->button, FALSE);
+  gtk_widget_set_overflow (priv->button, GTK_OVERFLOW_HIDDEN);
 
   g_signal_connect (priv->button, "clicked",
                    G_CALLBACK (gtk_tree_view_column_button_clicked),